function [action,alg]=action_selector(alg)

global THRESHOLD


% count
if alg.prodcount<(THRESHOLD)
    action=1;
else
    action=2;
end



;